<header class="navbar navbar-fixed-top navbar-inverse">
  <div class="container">
    <%= link_to "BLOG", '/', id: "logo" %>
    <nav>
      <ul class="nav navbar-nav navbar-right">
        <li><%= link_to "博客", '/articles' %></li>
        <li><%= link_to "用户", '/users' %></li>

        <% if current_user %>
          <li><%= link_to '新建博客', new_article_path %></li>
          <li><a href="/profile/<%= current_user.id%>">个人信息</a></li>
          <li><%= link_to('注销', destroy_user_session_path, :method => :delete) %> |</li>
        <% else %>
          <li><%= link_to('注册', new_registration_path(:user)) %> |</li>
          <li><%= link_to('登录', new_session_path(:user)) %></li>
        <% end %>
      </ul>
    </nav>
  </div>
</header>